#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> findIntersectionValues(vector<int>& nums1, vector<int>& nums2)
    {
        int ans1 = 0, ans2 = 0;
        for (int i = 0; i < nums1.size(); i++)
        {
            if (count(nums2.begin(), nums2.end(), nums1[i]))
                ans1++;
        }
        for (int i = 0; i < nums2.size(); i++)
        {
            if (count(nums1.begin(), nums1.end(), nums2[i]))
                ans2++;
        }
        return { ans1,ans2 };
    }
};